# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pycryptodome
_pkgname=pycryptodome
pkgver=3.15.0
pkgrel=2
pkgdesc='Cryptographic library for Python.'
url='https://pypi.org/project/pycryptodome/#files'
arch=('x86_64' 'aarch64')
license=('Apache' 'BSD')
depends=('python2' 'gmp')
makedepends=('python2-setuptools')
provides=('python2-crypto')
replaces=('python2-crypto')
conflicts=('python2-crypto')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('7b0c2efeeb6557c4116b493d6f68760bbf9423b3c6da94a2341160312592c1f6f9e693f30859962944130d83e8f7e698f2c092391a84000a029f19ecde906e19')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

